import React, { Component } from 'react'
import Protypes from 'prop-types'
export class MainBanner extends Component {
  render() {
    console.log(this.props)
    const { banner } = this.props
    return (
      <div>
        <h1>banner:</h1>
        <ul>
          {banner.map((item) => {
            return (
              <div key={item.acm}>
                <li>
                  {item.title}
                  <img src={item.image} alt="" />
                </li>
              </div>
            )
          })}
        </ul>
      </div>
    )
  }
}
MainBanner.propTypes = {
  banner: Protypes.array.isRequired,
}
MainBanner.defaultProps={
 banner:[]
}
export default MainBanner
